home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_cyn_watersplash.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
86 lines
# Jones 3D Cog Script
#
# TEM_WaterSplash.cog
#
# [TRM]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message startup
message timer
thing origin # Where the bubbles are coming from
thing wave local
thing player local
template splash0=+ripples2 local
template splash1=+ripples local
template splash2=+ripples local
vector vecPos local
vector startWave local
vector finWave local
int i=0 local
int waves=5 local
int randNum local
int splashing=0 local
flex fin_XY local
end
# ========================================================================================
code
startup:
Print("splashing on");
splashing = 1;
SetTimer(0.5);
return;
# ========================================================================================
# ========================================================================================
timer:
vecPos = VectorSet(rand()*0.15, rand()*0.15, 0);
# randomize finish size
randNum = RandBetween(1, 3);
if(randNum == 1) fin_XY = 0.1;
else if(randNum == 2) fin_XY = 0.3;
else if(randNum == 3) fin_XY = -0.05;
for(i=0; i<waves; i=i+1)
{
wave = CreateThingAtPos(splash0[RandBetween(0, 2)], GetThingSector(origin), VectorAdd(GetThingPos(origin), VectorAdd('-0.025 -0.035 0.0', vecPos)), '0 0 0');
CaptureThing(wave);
startWave = VectorSet(0.01, 0.01, 1.0);
finWave = VectorSet(0.3+fin_XY, 0.3+fin_XY, 0.0); # 0.15
AnimateSpriteSize(wave, startWave, finWave, 1.3);
}
if(i == 5)
{
i = 0;
SetTimer(0.5);
}
return;
# ========================================================================================
end